<?php

class userGroup extends Admin {

    private $name = "部门";

    public function __construct() {
        parent::__construct();
        $this->group = $this->Cache()->get( get_class() );
    }

    public function index( $c, $a ) {
        include $this->display( $c );
    }

    public function add( $c, $a ) {
        include $this->display( $c );
    }

    public function edit( $c, $a ) {
        if ( !$id = intval( G( 'id' ) ) ) {
            exit( '非法编辑部门' );
        }
        $this->table = get_class();
        $result = $this->find( array( 'id' => $id ) );
        include $this->display( $c );
    }

    public function purview( $c, $a ) {
        $this->table = $a;
        include $this->display( $c );
    }
}